<template>
	<view class="com-toolbar-item y-flex y-justify-center pl-40 pr-30" @tap.stop="handleItemClick">
		<slot>
			<com-text :color="color" :weight="weight" :size="size" :value="text"></com-text>
		</slot>
	</view>
</template>

<script>
	export default {
		name: 'ComToolbarItem',
		props: {
			text: {
				type: String,
				default: ''
			},
			color: {
				type: String,
				default: '#333'
			},
			weight: {
				type: String,
				default: 'bold'
			},
			size: {
				type: [String, Number],
				default: '33'
			}
		},
		methods: {
			handleItemClick (e) {
				// #ifdef APP-NVUE
				e.stopPropagation()
				// #endif
				this.$emit('click')
			}
		}
	}
</script>

<style>
	.com-toolbar-item {
		height: 100rpx;
	}
</style>